feat(antares): add Calendar and RangeCalendar components#202
Draft
egaitan-godaddy wants to merge 14 commits into
Draft
feat(antares): add Calendar and RangeCalendar components#202egaitan-godaddy wants to merge 14 commits into
egaitan-godaddy wants to merge 14 commits into
Conversation
🦋 Changeset detectedLatest commit: fd2022c The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
e12a0bd to
f980e46
Compare
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…nth range headers Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
RAC's <CalendarMonthPicker> / <CalendarYearPicker> read `state.focusedDate.month` for their displayed value. In a 2-month RangeCalendar, the focused date moves when the user hovers a cell during an in-progress range pick (RAC's `highlightDate` calls `setFocusedDate` to drive the highlight preview), so the dropdown labels would jump even though the underlying grids stayed stable. Pin the picker state Proxy's `focusedDate` to `state.visibleRange.start` (plus the position offset) instead of `state.focusedDate`. This anchors the dropdown labels to the GRID month and is no longer position-conditional — both left and right pickers benefit from the stable label. Adds a regression browser test. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
useCalendarState / useRangeCalendarState return plain object literals, so
{ ...baseState, focusedDate, setFocusedDate } gives the same result with no
trap mechanics. Drops useMemo too — RAC's state hook returns a fresh object
each render, so memoizing on baseState identity buys nothing.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
- Replace RACButton with antares Button (variant="minimal", size="sm") in CalendarHeader so prev/next inherit hover/focus/disabled styling from the design system. Drop the now-unused .navButton CSS. - Trim verbose JSDoc on Calendar, RangeCalendar, and CalendarHeader.
…hevrons in RTL
- Rename internal `position?: 'single' | 'left' | 'right'` prop to
`range?: 'start' | 'end'` (omit for single calendars). Names match the
range value shape (`{ start, end }`) and are locale-direction-agnostic.
- Read `useLocale()` and flip the prev/next chevron icons in RTL so they
point opposite the reading direction (matches RAC's recommended pattern).
- Update the calendar.node SSR snapshot — the prior Button-swap commit's
markup change (.navButton → antares Button classes) was never captured.
7cd92d8 to
95f2b4d
Compare
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
95f2b4d to
1cbe7c6
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
WIP